package com.jsm.twentyfour.controller;

import com.jsm.twentyfour.reponse.BaseResponse;
import com.jsm.twentyfour.request.BaseRequest;
import com.jsm.twentyfour.request.ComputeSuccessRequest;
import com.jsm.twentyfour.service.ScoreService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * create by jsm on 2019/1/24
 */
@RestController
public class ScoreController extends BaseController{
    @Resource
    private ScoreService scoreService;
    @PostMapping("/score/computeSuccess")
    public BaseResponse<Void> computeSuccess(@RequestBody ComputeSuccessRequest request){
        scoreService.computeSuccess(request.getUserId());
        return new BaseResponse <>();
    }
}
